INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${WORKINGPATH}/3rdParty/etc)
SET(LIB_NAME Weathertoy)

set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(QRC_SOURCE_FILES resources.qrc)
qt5_add_resources(QRC_FILES ${QRC_SOURCE_FILES})
#qt6_add_resources(QRC_FILES ${QRC_SOURCE_FILES})
SOURCE_GROUP("Resource Files" FILES ${QRC_SOURCE_FILES})

INCLUDE_DIRECTORIES(${OC_QT_PATH}/include)
INCLUDE_DIRECTORIES(${OC_QT_PATH}/include/QtWidgets)
INCLUDE_DIRECTORIES(${OC_QT_PATH}/include/QtCore)
INCLUDE_DIRECTORIES(${OC_QT_PATH}/include/QtWebEngineWidgets)
INCLUDE_DIRECTORIES(${OC_QT_PATH}/include/QtWebEngineCore)
INCLUDE_DIRECTORIES(${OC_QT_PATH}/include/QtGui)

LINK_DIRECTORIES(${OC_QT_PATH}/lib)

SET(TARGET_H
   LabViewer.h
   LabWebEngineView.h
   webuihandler.h
   Bridge.h
)

SET(TARGET_SRC
    LabViewer.cpp
    LabWebEngineView.cpp
    webuihandler.cpp
    Bridge.cpp
    main.cpp
    WeatherLab.rc
    ${QRC_FILES}
)
SET(TARGET_COMMON_LIBRARIES 
    OCMain
    Qt5Widgets
    Qt5Core
    Qt5WebEngineWidgets
    Qt5WebEngineCore
    Qt5Gui
    Qt5WebChannel
    Qt5Network
)
SETUP_APPLICATION(${LIB_NAME})

if (MSVC)
  set_property(TARGET ${LIB_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY ${OUTPUT_BINDIR})
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17 /Zc:__cplusplus")
#qt6_use_modules( ${LIB_NAME} Widgets )
#qt6_use_modules( ${LIB_NAME} Xml )
#qt6_use_modules( ${LIB_NAME} WebEngine )
#qt6_use_modules( ${LIB_NAME} WebView )
#qt6_use_modules( ${LIB_NAME} WebEngineWidgets )
